


# 翻转二叉树
# 最重要的就是掌握递归的思想


class Solution:

    def invertTree(self, root):

        if not root:
            return

        root.left, root.right = root.right, root.left

        self.invertTree(root.left)
        self.invertTree(root.right)

        return root


